<template>
<div class="radio" :class="typeClass">
  <div class="wrapper">
    <el-radio class="radio" v-model="radio" label="1">备选项</el-radio>
    <el-radio class="radio" v-model="radio" label="2">备选项</el-radio>
    <span @click="toConfig('config')" class="el-icon-setting"></span>
    <span @click="toConfig('delete')" class="el-icon-delete"></span>
  </div>
</div>
</template>
<script>
  export default{
    props:{
      data:{
        type:Object
      }
    },
    data(){
      return{
        radio:'1'
      }
    },
    computed:{
      typeClass(){
        return 'col' + this.data.width
      }
    },
    methods:{
      test(){
        console.log(this.checkedCities)
        this.list.push(item)
      },
      toConfig(setting){
        this.$emit(setting);
      }
    },
    mounted(){
       console.log(this.data)
    }
  }
</script>
<style lang="less" scoped>
.radio{
  display: inline-block;
  .wrapper{
    position: relative;
    box-sizing: border-box;
    border-bottom: 1px dashed #e2e2e2;
    width: 100%;
    padding:20px 10%;
    color:#249ffb;
    span{
      position: absolute;
      right: 0;
      top:5px;
      display: inline-block;
      width: 60px;
      line-height: 25px;
      text-align: center;
      &:last-child{
        top:33px;
      }
    }
  }
}
.col1{
    width: 33%;
}
.col2{
    width: 66%;
}
.col3{
    width: 100%;
}
</style>